package com.PrintDemo;

import java.awt.EventQueue;
import java.util.Arrays;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class DemoThread  {

	public void INITUI(){
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					UIDemo window = new UIDemo();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	
	static int count = 0;
	public void run() {
		try {
			  Thread.sleep(1000);
			  System.out.println("第一");
			  Runtime.getRuntime().exec("cmd /c  pause");
//			  Thread.sleep(1000);
//			  System.out.println("第二");
//			  Thread.sleep(1000);
//			  System.out.println("第三");
//			  Thread.sleep(1000);
//			  System.out.println("第四");
//			  Thread.sleep(1000);
//			  System.out.println("第五");
//			  Thread.sleep(1000);
//			  System.out.println("第六");
//			  Thread.sleep(1000);
			     INITUI();
			 int  n = JOptionPane.showConfirmDialog(null,"good","确认对话框", JOptionPane.YES_NO_OPTION);
		        if(n==JOptionPane.YES_OPTION){
		             	
		        }
		        else if(n==JOptionPane.NO_OPTION){
		        	
		        }
			System.out.println("end");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}